package org.hawk.gwtppc.webtest.tests.methodsuite;

import java.lang.reflect.Modifier;

import org.hawk.gwtppc.webtest.common.Asserts;
import org.hawk.gwtppc.webtest.common.Test;
import org.hawk.gwtppc.webtest.tests.mock.SubClassMock2;

public class GetModifiersTest implements Test {

	public void run() throws Throwable {
		Asserts.assertEquals(SubClassMock2.class.getDeclaredMethod("processValue").getModifiers(), Modifier.PUBLIC);
		Asserts.assertEquals(SubClassMock2.class.getDeclaredMethod("processValue", int.class).getModifiers(), 
				Modifier.PROTECTED | Modifier.FINAL);
		Asserts.assertEquals(SubClassMock2.class.getDeclaredMethod("processValue", int.class, Object.class).getModifiers(), 0);
		Asserts.assertEquals(SubClassMock2.class.getDeclaredMethod("processValue", int.class, Object.class, 
				SubClassMock2.class).getModifiers(), Modifier.PRIVATE | Modifier.STATIC);
	}

	public String getName() {
		return "getModifiers()";
	}

}
